package com.wen.service;

import com.wen.dao.BookMapper;
import com.wen.pojo.Books;

import java.util.List;

public class BookServiceImpl implements  BookService {
    private BookMapper bookMapper;
    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    public int addBook(Books books) {
        return  bookMapper.addBook(books);
    }

    public int deleteBook(String id) {
        return bookMapper.deleteBook(id);
    }


    public int updateBook(Books books) {
        return bookMapper.updateBook(books);
    }

    public Books queryBookById(String id) {
        return bookMapper.queryBookById(id);
    }

    public List<Books> queryAllBooks() {
        return bookMapper.queryAllBooks();
    }
}
